package com.cy.pj.sys.web.pojo;

/**
 * @DATE: 2021/3/15 19:54
 * @Author: LuckyH
 */

public class JsonResult {
    private Integer status=1;

    private String message="ok";

    private Object data;

    public JsonResult(Throwable e) {
        this(0,e.getMessage());
    }


    public JsonResult(Integer status, String message) {
        this.status = status;
        this.message = message;
    }

    public JsonResult(String message) {
        this.message = message;
    }

    public JsonResult(Integer status) {
        this.status = status;
    }

    public JsonResult(Object data) {
        this.data = data;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "JsonResult{" +
                "status=" + status +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
